{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Kobe Bryant Shot Selection"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Required packages: Numpy, Pandas and Scikit-Learn\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.model_selection import KFold\n",
    "\n",
    "from sklearn import svm\n",
    "from sklearn import neighbors\n",
    "from sklearn import linear_model\n",
    "from sklearn.naive_bayes import GaussianNB\n",
    "from sklearn.ensemble import AdaBoostClassifier\n",
    "from sklearn.neural_network import MLPClassifier\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "\n",
    "from sklearn.metrics import classification_report\n",
    "from sklearn.metrics import confusion_matrix\n",
    "from sklearn.metrics import accuracy_score\n",
    "from sklearn.metrics import precision_recall_fscore_support"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "data_cl = pd.read_csv(\"data/data_cl.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 5956 entries, 0 to 5955\n",
      "Columns: 148 entries, loc_x to period#Others\n",
      "dtypes: category(1), float64(4), int64(143)\n",
      "memory usage: 6.7 MB\n"
     ]
    }
   ],
   "source": [
    "# Convert shot made flag to categorical and print the dataset info\n",
    "data_cl[\"shot_made_flag\"] = data_cl[\"shot_made_flag\"].astype('category')\n",
    "data_cl.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Split the dataset in train and test. Also separing features from target (Pandas to numpy array at the end)\n",
    "X = data_cl.drop(['shot_made_flag'], axis=1).as_matrix()\n",
    "y = data_cl.shot_made_flag.as_matrix()\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    X, y, test_size=0.2, random_state=42)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Setup the k-fold cross validation\n",
    "k_folds = 10\n",
    "kf = KFold(n_splits=k_folds, shuffle = True, random_state = 1234)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Apply the models"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Naive Bayes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Accuracy = 62.11%\n",
      "Precision = No: 59.88% , Yes: 76.21%\n",
      "Recall = No: 90.77% , Yes: 29.09%\n",
      "F1-score = No: 71.85% , Yes: 40.63%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[2320  238]\n",
      " [1567  639]]\n"
     ]
    }
   ],
   "source": [
    "count = 0\n",
    "accuracy = 0\n",
    "cm = 0\n",
    "prfs = 0\n",
    "\n",
    "for train_idx, test_idx in kf.split(X_train):\n",
    "    count += 1\n",
    "    # Separe training and test in the Training set for k-Fold\n",
    "    fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "    fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "    \n",
    "    # Train\n",
    "    clf = GaussianNB()\n",
    "    clf.fit(fold_Xtrain, fold_ytrain)\n",
    "    pred = clf.predict(fold_Xtest)\n",
    "    accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "    cm += confusion_matrix(fold_ytest, pred)\n",
    "    prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[0,0]/k_folds), '{0:.2f}'.format(prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[1,0]/k_folds), '{0:.2f}'.format(prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[2,0]/k_folds), '{0:.2f}'.format(prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(prfs[3,0]/k_folds), int(prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(cm)   "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### kNN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Best k = 50\n",
      "Accuracy = 62.78%\n",
      "Precision = No: 61.26% , Yes: 67.04%\n",
      "Recall = No: 83.68% , Yes: 38.61%\n",
      "F1-score = No: 70.69% , Yes: 48.90%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[2140  418]\n",
      " [1355  851]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAicAAAF5CAYAAABEPIrHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmYFNXVx/HvAQRFEYwLiOKCC2BcZ9xQ3DBqTIKKUV9H\njZpE4xKNonldYzSLURMDRo0mmpgg6hiJW4zkNS7dIpvIDKKGxR2UZUT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ikihKTkRERCRRlJyIiIhIoig5ERERkURRciIiIiKJouREREREEuX/AXEmbAlDDJeVAAAAAElF\nTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x13c1c938d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "hist_accuracy = []\n",
    "best_k = -1\n",
    "k_neig = [5,10,15,20,25,30,35,40,45,50]\n",
    "best_accuracy = 0\n",
    "# Optimize k\n",
    "for k in k_neig :\n",
    "    count = 0\n",
    "    accuracy = 0\n",
    "    cm = 0\n",
    "    prfs = 0\n",
    "\n",
    "    for train_idx, test_idx in kf.split(X_train):\n",
    "        count += 1\n",
    "        # Separe training and test in the Training set for k-Fold\n",
    "        fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "        fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "\n",
    "        # Train\n",
    "        clf = neighbors.KNeighborsClassifier(n_neighbors=k)\n",
    "        clf.fit(fold_Xtrain, fold_ytrain)\n",
    "        pred = clf.predict(fold_Xtest)\n",
    "        accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "        cm += confusion_matrix(fold_ytest, pred)\n",
    "        prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "    hist_accuracy.append(accuracy/k_folds)\n",
    "    if accuracy >= best_accuracy:\n",
    "        best_k = k\n",
    "        best_accuracy = accuracy\n",
    "        best_prfs = prfs\n",
    "        best_cm = cm\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Best k = %s\" % best_k)\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(best_accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[0,0]/k_folds), '{0:.2f}'.format(best_prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[1,0]/k_folds), '{0:.2f}'.format(best_prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[2,0]/k_folds), '{0:.2f}'.format(best_prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(best_prfs[3,0]/k_folds), int(best_prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(best_cm)\n",
    "\n",
    "# Plot k over iter\n",
    "plt.plot(k_neig, hist_accuracy)\n",
    "plt.ylabel('Accuracy')\n",
    "plt.xlabel('k-neighbors')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Logistic Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Accuracy = 66.46%\n",
      "Precision = No: 64.23% , Yes: 71.93%\n",
      "Recall = No: 84.69% , Yes: 45.29%\n",
      "F1-score = No: 73.02% , Yes: 55.49%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[2166  392]\n",
      " [1206 1000]]\n"
     ]
    }
   ],
   "source": [
    "count = 0\n",
    "accuracy = 0\n",
    "cm = 0\n",
    "prfs = 0\n",
    "\n",
    "for train_idx, test_idx in kf.split(X_train):\n",
    "    count += 1\n",
    "    # Separe training and test in the Training set for k-Fold\n",
    "    fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "    fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "    \n",
    "    # Train\n",
    "    clf = linear_model.LogisticRegression()\n",
    "    clf.fit(fold_Xtrain, fold_ytrain)\n",
    "    pred = clf.predict(fold_Xtest)\n",
    "    accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "    cm += confusion_matrix(fold_ytest, pred)\n",
    "    prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[0,0]/k_folds), '{0:.2f}'.format(prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[1,0]/k_folds), '{0:.2f}'.format(prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[2,0]/k_folds), '{0:.2f}'.format(prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(prfs[3,0]/k_folds), int(prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(cm)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Support Vector Machine"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false,
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Heitor\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\classification.py:1113: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples.\n",
      "  'precision', 'predicted', average, warn_for)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Best C = 5\n",
      "Accuracy = 54.18%\n",
      "Precision = No: 49.02% , Yes: 63.75%\n",
      "Recall = No: 89.88% , Yes: 13.10%\n",
      "F1-score = No: 63.41% , Yes: 11.80%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[2295  263]\n",
      " [1920  286]]\n"
     ]
    },
    {
     "data": {
      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OmYcedEUvOSnADOA08AdwG/AJ8AF6vqgyFrk7R6hhNJktQUL+tIkqSmGE4kSVJTDCeSJKkp\nhhNJktQUw4kkSWqK4USSJDXFcCJJkppiOJEkSU0xnEiSpKYYTiRJUlMMJ5IkqSmGE0mS1JR/Ab55\n7LK2tuNyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x13c232c0f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "hist_accuracy = []\n",
    "best_C = -1\n",
    "C = [5, 10, 15, 20, 25]\n",
    "best_accuracy = 0\n",
    "\n",
    "# Optimize k\n",
    "for current_c in C :\n",
    "    count = 0\n",
    "    accuracy = 0\n",
    "    cm = 0\n",
    "    prfs = 0\n",
    "\n",
    "    for train_idx, test_idx in kf.split(X_train):\n",
    "        count += 1\n",
    "        # Separe training and test in the Training set for k-Fold\n",
    "        fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "        fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "\n",
    "        # Train\n",
    "        clf = svm.LinearSVC(C=current_c, max_iter = 10000)\n",
    "        clf.fit(fold_Xtrain, fold_ytrain)\n",
    "        pred = clf.predict(fold_Xtest)\n",
    "        accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "        cm += confusion_matrix(fold_ytest, pred)\n",
    "        prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "    hist_accuracy.append(accuracy/k_folds)\n",
    "    if accuracy >= best_accuracy:\n",
    "        best_C = current_c\n",
    "        best_accuracy = accuracy\n",
    "        best_prfs = prfs\n",
    "        best_cm = cm\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Best C = %s\" % best_C)\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(best_accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[0,0]/k_folds), '{0:.2f}'.format(best_prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[1,0]/k_folds), '{0:.2f}'.format(best_prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(best_prfs[2,0]/k_folds), '{0:.2f}'.format(best_prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(best_prfs[3,0]/k_folds), int(best_prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(best_cm)\n",
    "\n",
    "# Plot k over iter\n",
    "plt.plot(C, hist_accuracy)\n",
    "plt.ylabel('Accuracy')\n",
    "plt.xlabel('C')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Random Forests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Accuracy = 64.23%\n",
      "Precision = No: 63.95% , Yes: 64.82%\n",
      "Recall = No: 76.64% , Yes: 49.85%\n",
      "F1-score = No: 69.67% , Yes: 56.27%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[1960  598]\n",
      " [1106 1100]]\n"
     ]
    }
   ],
   "source": [
    "count = 0\n",
    "accuracy = 0\n",
    "cm = 0\n",
    "prfs = 0\n",
    "\n",
    "for train_idx, test_idx in kf.split(X_train):\n",
    "    count += 1\n",
    "    # Separe training and test in the Training set for k-Fold\n",
    "    fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "    fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "    \n",
    "    # Train\n",
    "    clf = RandomForestClassifier(n_jobs = -1, n_estimators = 200, criterion = \"entropy\")\n",
    "    clf.fit(fold_Xtrain, fold_ytrain)\n",
    "    pred = clf.predict(fold_Xtest)\n",
    "    accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "    cm += confusion_matrix(fold_ytest, pred)\n",
    "    prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[0,0]/k_folds), '{0:.2f}'.format(prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[1,0]/k_folds), '{0:.2f}'.format(prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[2,0]/k_folds), '{0:.2f}'.format(prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(prfs[3,0]/k_folds), int(prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(cm)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Neural Networks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Heitor\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\classification.py:1113: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples.\n",
      "  'precision', 'predicted', average, warn_for)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average statistics: \n",
      "\n",
      "Accuracy = 50.55%\n",
      "Precision = No: 27.12% , Yes: 23.43%\n",
      "Recall = No: 50.00% , Yes: 50.00%\n",
      "F1-score = No: 35.16% , Yes: 31.88%\n",
      "Support = No: 25580 , Yes: 22060\n",
      "\n",
      "Confusion-Matrix: \n",
      "[[1292 1266]\n",
      " [1090 1116]]\n"
     ]
    }
   ],
   "source": [
    "count = 0\n",
    "accuracy = 0\n",
    "cm = 0\n",
    "prfs = 0\n",
    "\n",
    "for train_idx, test_idx in kf.split(X_train):\n",
    "    count += 1\n",
    "    # Separe training and test in the Training set for k-Fold\n",
    "    fold_Xtrain, fold_Xtest = X_train[train_idx], X_train[test_idx]\n",
    "    fold_ytrain, fold_ytest = y_train[train_idx], y_train[test_idx]\n",
    "    \n",
    "    # Train\n",
    "    clf = MLPClassifier(alpha=1e-5, hidden_layer_sizes=(100,), learning_rate_init = 0.1, random_state=1, activation = 'logistic')\n",
    "    clf.fit(fold_Xtrain, fold_ytrain)\n",
    "    pred = clf.predict(fold_Xtest)\n",
    "    accuracy += accuracy_score(fold_ytest, pred)*100\n",
    "    cm += confusion_matrix(fold_ytest, pred)\n",
    "    prfs += np.asarray(precision_recall_fscore_support(fold_ytest, pred))*100\n",
    "    \n",
    "print(\"Average statistics: \")\n",
    "print(\"\")\n",
    "print(\"Accuracy = %s%%\" % '{0:.2f}'.format(accuracy/k_folds))\n",
    "print(\"Precision = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[0,0]/k_folds), '{0:.2f}'.format(prfs[0,1]/k_folds)))\n",
    "print(\"Recall = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[1,0]/k_folds), '{0:.2f}'.format(prfs[1,1]/k_folds)))\n",
    "print(\"F1-score = No: %s%% , Yes: %s%%\" % ('{0:.2f}'.format(prfs[2,0]/k_folds), '{0:.2f}'.format(prfs[2,1]/k_folds)))\n",
    "print(\"Support = No: %s , Yes: %s\" % (int(prfs[3,0]/k_folds), int(prfs[3,1]/k_folds)))\n",
    "print(\"\")\n",
    "print(\"Confusion-Matrix: \")\n",
    "print(cm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
